gdk: Lookup both device and global cursor when checking up the hierarchy
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 14 May 2014 10:53:54 +0000 (12:53 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 23 May 2014 17:54:31 +0000 (19:54 +0200)
When the pointer cursor is updated on CSW, lookup for either a device
cursor, or a global one. It would previously lookup for windows with
a global cursor, and then check if it had a device cursor, which would
skip windows with only device cursors set, and unexpectedly set the
global cursor.

gdk/gdkwindow.c

index e343e2c704fd596dc1c5faf9b817172fcf18132c..c66c8ee20418599e0b6d423277f4d6e8b7c2dc73 100644 (file)
@@ -6891,6 +6891,7 @@ update_cursor (GdkDisplay *display,
   /* Find the first window with the cursor actually set, as
      the cursor is inherited from the parent */
   while (cursor_window->cursor == NULL &&
+         !g_hash_table_contains (cursor_window->device_cursor, device) &&
         (parent = get_event_parent (cursor_window)) != NULL &&
         parent->window_type != GDK_WINDOW_ROOT)
     cursor_window = parent;